From: Richard M. Stallman Date: Tue, 13 Sep 1994 04:14:00 +0000 (+0000) Subject: (rmail-summary-goto-msg): Preserve the current buffer. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~90335 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c7b5ca27bfb9ef17ebfb456021f543a5308651bb;p=emacs.git (rmail-summary-goto-msg): Preserve the current buffer. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 5a009ce55dc..46ea888fe06 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -780,7 +780,8 @@ Commands for sorting the summary: (if (consp n) (setq n (prefix-numeric-value n))) (if (eobp) (forward-line -1)) (beginning-of-line) - (let ((buf rmail-buffer) + (let ((obuf (current-buffer)) + (buf rmail-buffer) (cur (point)) message-not-found (curmsg (string-to-int @@ -832,7 +833,9 @@ Commands for sorting the summary: (unwind-protect (progn (pop-to-buffer buf) (rmail-show-message n)) - (select-window selwin)))))) + (select-window selwin) + ;; The actions above can alter the current buffer. Preserve it. + (set-buffer obuf)))))) (defun rmail-summary-scroll-msg-up (&optional dist) "Scroll the Rmail window forward."